//
//  YRControlButton.h
//  YouRong4iPhone
//
//  Created by 张常兴 on 15/3/22.
//  Copyright © 2015年 小怪兽. All rights reserved.
//
#import <UIKit/UIKit.h>
//#import "YRAppMacro.h"
//#import "YRColorMacro.h"
//#import "UIView+YR.h"

typedef void(^buttonActionLock)(NSInteger index);

@interface YRControlButton : UIView

@property (nonatomic, copy) buttonActionLock block;

/**
 *  初始化controlBtn的UI样式
 *
 *  @param titles        标题
 *  @param icons         图标
 *  @param selectedIcons 选中图标
 *  @param separator     是否显示分割线
 *  @param isShort       是否是短下划线
 *  @param color         背景颜色
 *  @param selectedColor 选中颜色
 *  @param index         默认位置
 */
- (void)initButtonWithTitles:(NSArray *)titles
                        icon:(NSArray *)icons
                iconSelected:(NSArray *)selectedIcons
             isShowSeparator:(BOOL     )separator
             isShortSelector:(BOOL     )isShort
         setButtonBackground:(UIColor *)color
 setButtonSelectedBackground:(UIColor *)selectedColor
                defaultIndex:(NSInteger)index;


- (void)selectAtIndex:(NSInteger)index;
- (void)clear;


@end



